﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.Shell;
using System.ComponentModel;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace VitalyZayko.Code4Blog
{
    /// <summary>
    /// 
    /// </summary>
    [ClassInterface(ClassInterfaceType.AutoDual)]
    [Guid("CC0B61A0-B1AC-4D04-9077-E54CE474A89D")]
    class Code4BlogOptions : DialogPage
    {
        public decimal MaxWidth { get; set; }
        public decimal MaxHeight { get; set; }
        public string OddColor { get; set; }
        public string EvenColor { get; set; }
        public string FontFamily { get; set; }
        public decimal FontSize { get; set; }
        public bool DrawBorder { get; set; }
        public bool LineNumbers { get; set; }

        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        protected override IWin32Window Window
        {
            get
            {
                OptionPageControl page = new OptionPageControl();
                page.OptionPage = this;
                page.Initialize();
                return page;
            }
        }

        protected override void OnApply(DialogPage.PageApplyEventArgs e)
        {
            this.SaveSettingsToStorage();
            base.OnApply(e);
        }

        protected override void OnClosed(EventArgs e)
        {
            
            base.OnClosed(e);
        }
    }
}
